/**
 * Copyright By Nanjing Fujitsu Nanda Software Technology Co., Ltd
 * 上午10:23:15
 * CoreMessageService.java
 * 
 */
package com.fujitsu.nanjing.mobile.service;

import com.fujitsu.nanjing.mobile.dao.CoreMessageDao;
import com.fujitsu.nanjing.mobile.model.hibernate.CoreMessage;

import org.springframework.transaction.annotation.Transactional;

import org.springframework.stereotype.Service;

import java.util.List;

import javax.annotation.Resource;

/**
 * @author qixb.fnst
 * 
 */
@Service
@Transactional
public class CoreMessageService implements BaseService<CoreMessage> {
    @Resource
    private CoreMessageDao coreMessageDao;

    @Override
    public CoreMessage find(int id) {
        return coreMessageDao.query(CoreMessage.class, id);
    }

    @Override
    public CoreMessage modify(CoreMessage t) {
        return coreMessageDao.update(t);
    }

    @Override
    public void delete(CoreMessage t) {
         coreMessageDao.delete(t);

    }

    @Override
    public CoreMessage add(CoreMessage t) {
       
        return   coreMessageDao.insert(t);
    }

    @Override
    public List<CoreMessage> find(String queryString) {
        //
        return coreMessageDao.query(queryString);
    }

}
